package com.yunhe.service;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import com.yun.dao.checkUserIn;
import com.yun.dao.pingjiaDao;
import com.yunhe.bean.ShopPingJia;
import com.yunhe.bean.ShopUser;
import com.yunhe.util.MySession;

public class pingjiaService {
	
	public int addpingJia(ShopPingJia pingjia){
		SqlSession se = new MySession().getSession();
		pingjiaDao mapper = se.getMapper(pingjiaDao.class);
		 int x = mapper.addpingJia(pingjia);
		 se.commit();
		 return x;
	}
	
	public List<ShopUser> showPingjia(){
		SqlSession se = new MySession().getSession();
		pingjiaDao mapper = se.getMapper(pingjiaDao.class);
		List<ShopUser> su = mapper.showPingjia();
		
		return su;
	}
	


}
